home *** CD-ROM | disk | FTP | other *** search
- Path: sable.ox.ac.uk!worc0223
- From: worc0223@sable.ox.ac.uk (Benjamin Hutchings)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: x ^= y ^= x ^= y;
- Date: 6 Mar 1996 00:21:27 GMT
- Organization: Oxford University, England
- Message-ID: <4hilq7$rpg@news.ox.ac.uk>
- References: <1286.6624T1439T237@cs.ruu.nl> <3131C523.1ECC@sapiens.com> <4h075l$2go@elmer.tsc.com> <2141.6632T1213T2220@cs.ruu.nl>
- NNTP-Posting-Host: sable.ox.ac.uk
-
- In article <2141.6632T1213T2220@cs.ruu.nl>,
- Wessel Dankers <wsldanke@cs.ruu.nl> wrote:
- >Bill Roberts <billr@elmer.tsc.com> wrote:
- >> In article <3131C523.1ECC@sapiens.com>, Avi Lev <avil@sapiens.com> wrote:
- >>>Benjamin Hutchings wrote:
- >>>it'll damn right WILL work because this is proper C syntax and
- >>>therefore must work, if it doesn't then your compiler had better
- >>>be replaced for a real C compiler cuz it obviously isn't one.
- >Damn right! Tell'm, Ben!
-
- You f*cking idiot! I didn't write that! Get your attribution lines right
- or just leave this thread and go back to your AMOS tutorials.
-
- >
- >> What expression result will be in x at the end of the expression? The
- >> first one or the second one? The compiler may choose either. The c
- >No it definitely CAN'T choose!
- >The return value of an assignment is strictly documented and an ANSI feature!
-
- The compiler can choose to store the new values of variables in any order
- it wants. So when the variable is read again later in the evaluation of the
- expression you do _not_ know whether it will read the changed value or the
- original value. So the results of statements such as "x ^= y ^= x ^= y;" are
- undefined under ANSI. This is in the FAQ in a relevant group, I believe, since
- it comes up so often. KILL THIS THREAD NOW! I can't be bothered to reply to
- the rest of your idiotic posting.
-
-
-
- --
- Ben Hutchings, student. Finger me as m95bwh@booth42.ecs.ox.ac.uk if you must.
- email: benjamin.hutchings@worc.ox.ac.uk WWW: http://info.ox.ac.uk/~worc0223/
- My brother says: "Read Not 'alf Bad at http://info.ox.ac.uk/~worc0223/nab/".
-